I know C and DXL have some features in common but the "extern" reserved word is not one of them. #include "package1.dxl" #include "package2.dxl" #include "package3.dxl" #include "package4.dxl"
const string INTERNAL_CONSTANT = "Internal Constant Value";
string EXPOSED_CONSTANT() {
return INTERNAL_CONSTANT;
}
string EXPOSED_CONSTANT();
SystemAdmin - Wed Jun 30 14:15:53 EDT 2010 |
Re: What is best way to convey an "interface" for a DXL module? I can offer you three methods, that you can use to make the interface clear to other developers: a) Use Doxygen (see earlier post or example in the dxl standard library) to document your code (generates HTML help page or compiled html -> CHM). Document only the public interface! b) Mark private functions with an underscore _ at the end of the name. That is like a convention in DOORS. c) encrypt the private part of your include files, deliver the public part unencrypted. I guess most of the time it is convenient only to add the underscores to the name and trust people that they will only use those functions. Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: What is best way to convey an "interface" for a DXL module? Mathias Mamsch - Wed Jun 30 14:35:23 EDT 2010 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS If the underscore suffix '_' for "internals" is conventional, I may as well go with it. I'll be sure not to any internal identifier called addr_ however :) |
Re: What is best way to convey an "interface" for a DXL module? SystemAdmin - Wed Jun 30 16:42:34 EDT 2010 Find some details and an example in an earlier post here (search for doxygen) or take a look at the DXL standard library (sourceforge) for the patched doxygen and some examples. Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: What is best way to convey an "interface" for a DXL module? Since things are about to change and my functions may be merged with other sector's, yet I retain control, I'll need a better naming convention, one that indicates which Sector 'owns' the function, which will discourage identical function name conflicts. You can indeed embed functions inside other functions, but these embedded functions cannot use variables defined in the parent function. Odd, very odd; and that makes embedding functions pretty useless.
|